$(function(){
    
    var mySwiper = new Swiper('.swiper-container', {
        pagination: '.swiper-pagination',
        slidesPerView:1.3,
        grabCursor : true,
        centeredSlides : true,
        paginationClickable: true,
        spaceBetween: 15,
        loop: true,
        autoplay: 2000,
        autoResize : false,
        autoplayDisableOnInteraction: false,
    });
    
	//图片轮换，容器宽高比例
	var imgRMH = ( $(".pic_wraper_rm").width() * 23) / 32 ;
	$(".pic_wraper_rm").css("height",imgRMH);

	//图片轮换，容器宽高比例
	var swH = ( $(".swiper-container").width() * 34 ) / 64 ;
	$(".swiper-container").css("height","100%");

	//图片轮换，单张图片宽高比例
	var imgH = ( $(".swiper-slide").width() * 315 ) / 480 ;
	$(".swiper-slide").css("height",imgH);

	//产品列表，单张图片宽高比例
	var piH = ( $(".product_img").width() * 18 ) / 21 ;
	$(".product_img").css("height",piH);
	$(".product_info").css("height",piH);
	var h1 = $(".product_info .title").height(),h2 = $(".product_info .last").height();
	var wh = piH - h1 - h2 ;
	for ( i=1 ; i < 100 ; i++ ) {
		var ih = 18 * i ;
		if ( wh < ih ){
			wh = ih - 18 ;
			break;
		}
	}
	$(".product_info .word").css("max-height",wh);
	
//	$("#za_index_main").css("height",$(window).height());
}); 
$(window).resize(function(){ 
	//图片轮换，容器宽高比例
	var imgRMH = ( $(".pic_wraper_rm").width() * 23) / 32 ;
	$(".pic_wraper_rm").css("height",imgRMH);

	//图片轮换，容器宽高比例
	var swH = ( $(".swiper-container").width() * 34 ) / 64 ;
	$(".swiper-container").css("height","100%");

	//图片轮换，单张图片宽高比例
	var imgH = ( $(".swiper-slide").width() * 315 ) / 480 ;
	$(".swiper-slide").css("height",imgH);

	//产品列表，单张图片宽高比例
	var piH = ( $(".product_img").width() * 18 ) / 21 ;
	$(".product_img").css("height",piH);
	$(".product_info").css("height",piH);
	var h1 = $(".product_info .title").height(),h2 = $(".product_info .last").height();
	var wh = piH - h1 - h2 ;
	for ( i=1 ; i < 100 ; i++ ) {
		var ih = 18 * i ;
		if ( wh < ih ){
			wh = ih - 18 ;
			break;
		}
	}
	$(".product_info .word").css("max-height",wh);
});